<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>公司部门设置列表</title>
<!-- BEGIN 页面公共文件 -->
<load href="__COMMON__/css/init.css" />
<load href="__COMMON__/css/font-icons.css" />
<load href="__COMMON__/js/jquery.min.js" />
<!-- END 页面公共文件 -->

<!-- BEGIN 当前页面的css 和js -->
<load href="__COMMON__/css/tools/page.css" />
<load href="__COMMON__/css/tools/easydialog.css" />
<load href="__ADMIN_CSS__/common.css" />
<load href="__ADMIN_CSS__/message/msgtype_set.css" />
<load href="__COMMON__/js/tools/easydialog.min.js" />
<load href="__COMMON__/js/tools/Validator.js" />
<!-- END 当前页面的css 和js -->

</head>
<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="{:U('Index/main')}" >首页</a></li>
    <li><a href="javascript:void(0)">留言类型设置</a></li>
    </ul>
    </div>    
    <div class="rightinfo">
    
    <div class="tools">    
    	<ul class="toolbar">
        <li class="news-add" onclick="addmsgtype()"><i class="fa fa-user-plus"></i>新增类型</li>
        <li class="news-add" onclick="window.location.href='{:U('Message/index')}'"><i class="fa fa-comment"></i>留言列表</li>
        </ul> 
        <ul class="toolbar1">
        <li onclick="window.location.reload()"><span><i class="fa fa-refresh"></i>重载此页</li>
        </ul>
    </div>
    <table class="tablelist">
    	<thead>
    	<tr>       
        <th width="10%">序号</th>
        <th width="30%">类型名称</th>
        <th width="15%">添加时间</th>
        <th width="10%">当前留言条数</th>
        <th width="10%">排序</th>
        <th width="25%">操作</th>
        </tr>
        </thead>
        <tbody>
        <if condition="$msgtypes">
       	<foreach name="msgtypes" item="msgtype">
         <tr class="tbcontent">
        <td class="num">{++$count}<input type="hidden" value="{$msgtype.id}" name="msgtypeid"/><span style="display: none;" data-desc="{$msgtype.description}" data-key="{$msgtype.keywords}"></span></td>
        <td>{$msgtype.typename|default='<b style="color: #898989">暂未设置</b>'}</td>
       <td>{$msgtype.addtime|date='Y-m-d H:i', ###}</td>
        <td>{$msgtype.msgnum|default=0}</td>
        <td class="dpsort">{$msgtype.sortorder}</td>
        <td class="multi-operate">
        <input type="hidden" value="{$msgtype.id}" name="depid" />
		<a href="javascript:void(0)" title="编辑类型" class="tab-btn edit_dep" spm-name="{$msgtype.typename}">编辑</a>
		<a href="javascript:void(0)" title="删除" class="tab-btn recycle" spm-name="{$msgtype.typename}">删除</a>
		</td>
        </tr> 
        </foreach>
        <else />
        <tr>
        	<td colspan="6" style="height: 100px; font-size: 20px; font-family:'Microsoft Yahei'; text-align: center; color: #999;">当前没有可用的留言类型，前端将无法使用留言功能，您需点击左上方添加类型！</td>
        </tr>        
        </if>
        </tbody>    
        <tr>
        <td class="multi-operate multi-operate-btn" colspan="6">{$page}</td>
        </tr> 
    </table>
    <div class="subtable" id="subtable">
    		<h3><b style="color: #E36358;">创意一部</b> 部门下的所有成员<a href="javascript:void(0)" class="close_dialog">×</a></h3>
    	<div class="subtable_container">
		<p class="window_mask">正在获取部门下的成员列表，请稍候……</p>		
    	</div>    
    </div>
</div>
<!-- BEGIN 部门添加/编辑弹窗 -->
<div class="mask"></div>
<div id="dialogbox" class="pop_create_album">
	<input type="hidden" value="0" name="depID"/>
	<p class="title"><span class="txt">编辑信息</span><span class="close"><i class="fa fa-close"></i></span></p>
	<p class="form-content">
		<span class="form_name"><label for="depname">类型名称：</label></span>
		<input type="text" id="depname" name="name" class="int_txt" maxlength="25">
		<span class="count_txt"><span id="name_word">0</span>/25</span>
	</p>
	<p id="name_tips" class="bg c_tx notice"></p>	
	
	<p class="form-content">
		<span class="form_name"><label for="sortorder">排序设置：</label></span>
			<input type="text" class="int_txt" value="50" name="sortorder" id="sortorder"/>
	</p>
	<p class="btn">
		<input type="hidden" name="depID" value="0" />
		<a href="javascript:void(0)" class="cancel">取消</a>
		<a href="javascript:void(0)" class="submit">提交</a>
	</p>
</div>
<!-- END 部门添加/编辑弹窗 -->

</body>
</html>
<script type="text/javascript">
var $postUrl="{:U('Message/msgtype')}";
</script>
<load href="__ADMIN_JS__/message/msgtype_set.js" />
